package top.kaoshanji.p2ch14b;

/**
 * 代码清单-p2ch14b-156页a：修改后的场景类
 * @author kaoshanji
 * ^_^
 * create time 2025/3/23 15:18
 */
public class Client {

    public static void main(String[] args) {

        AbstractMediator mediator = new Mediator();

        // 采购人员采购电脑
        System.out.println("--------采购人员采购电脑--------");
        Purchase purchase = new Purchase(mediator);
        purchase.buyIBMComputer(100);

        // 销售人员销售电脑
        System.out.println("--------销售人员销售电脑--------");
        Sale sale = new Sale(mediator);
        sale.sellIBMComputer(1);

        // 库房管理人员管理库存
        System.out.println("--------库房管理人员清理库存--------");
        Stock stock = new Stock(mediator);
        stock.clearStock();

    }



}
